﻿//*****************************************************************************
// Source: http://www.codeproject.com/KB/WF/DynamicSendActivity.aspx
//*****************************************************************************
//
using System;
using System.Activities.Presentation.Metadata;
using System.Activities.Presentation.PropertyEditing;
using System.ComponentModel;

namespace TfsCloudDeploy.Workflow.Core.DeploymentService.Activities.Design
{
    public class Metadata : IRegisterMetadata
    {
        public Metadata() { }
        public void Register()
        {
            AttributeTableBuilder builder = new AttributeTableBuilder();

            builder.AddCustomAttributes(typeof(BindingScope), new DesignerAttribute(typeof(BindingScopeDesigner)));

            Type attrType = Type.GetType("System.Activities.Presentation.FeatureAttribute, System.Activities.Presentation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35");
            Type argType = Type.GetType("System.Activities.Presentation.UpdatableGenericArgumentsFeature, System.Activities.Presentation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35");

            MetadataStore.AddAttributeTable(builder.CreateTable());
        }
    }
}
